#include "Youth.h"

Youth::Youth()
{
    m_quorum = QuorumType::Deacon;
    m_name = "DefaultName";
}

Youth::~Youth()
{
}

//accessors
CertificateRequirements& Youth::requirements(QuorumType::Type i_quorum)
{
	switch (i_quorum)
	{
	case QuorumType::Deacon: return m_deacon; break;
	case QuorumType::Teacher: return m_teacher; break;
	case QuorumType::Priest: return m_priest; break;
	default:
		break;
	}
	
	return m_deacon;
}

QuorumType::Type Youth::quorum()
{
	return m_quorum;
}

QString Youth::name()
{
	return m_name;
}
QDate   Youth::birthdate()
{
	return m_birthdate;
}
QString Youth::phoneNumber()
{
	return m_phoneNumber;
}
QString Youth::address()
{
	return m_address;
}
QDate Youth::quorumEntryDate()
{
	return m_quorumEntryDate;
}
QDate Youth::lastUpdate()
{
	return m_lastUpdate;
}

//modifiers
void Youth::setQuorum(QuorumType::Type quorum)
{
	m_quorum = quorum;
	emit modified();
}
void Youth::setName(QString name)
{
	m_name = name;
	emit modified();
}
void Youth::setBirthdate(QDate birthdate)
{
	m_birthdate = birthdate;
	emit modified();
}
void Youth::setPhoneNumber(QString number)
{
	m_phoneNumber = number;
	emit modified();
}
void Youth::setAddress(QString address)
{
	m_address = address;
	emit modified();
}
void Youth::setQuorumEntryDate(QDate date)
{
	m_quorumEntryDate = date;
	emit modified();
}
void Youth::setLastUpdate(QDate date)
{
	m_lastUpdate = date;
	emit modified();
}
